layui.define(['layer', 'form','element','carousel','util'], function(exports) {
    var $ = layui.jquery,
        layer = layui.layer,
        layelement = layui.element,
        laycarousel = layui.carousel,
        layutil = layui.util,
        layform = layui.form;
    var see = {
        // list小栏目导航
        listnav:function (o) {
            $(o).addClass("listnavclick");
            $(o).siblings(".listnavclick").removeClass("listnavclick");
        },
        //手机菜单
        navlay:function(o){
            var d = $(o).data();
            var g = .8 * $(window).width();
            var h = .4 * $(window).height();
            layer.open({
                type:1,
                area: [g + "px",h + "px"],
                resize:false,
                title: false,
                content:$(d.cid),
            });
        },
    };
    // 轮播图
    laycarousel.render({
        elem: '#indexbg'
        ,width: '100%' //设置容器宽度
        //,anim: 'updown' //切换动画方式
    });
    // 客户评价轮播图
    laycarousel.render({
        elem: '#indexanli'
        ,width: '100%' //设置容器宽度
        ,height: '360px'
        ,arrow: 'always' //始终显示箭头
        //,anim: 'updown' //切换动画方式
    });

    $('body').on('click','.cx-click',function () {
        var a = $(this),
            b = a.data('type');
        see[b] ? see[b].call(this, a) : ""
    });

    exports('app', {});
});


